package other;

import javax.swing.tree.TreeNode;

/**
 * @program: datastructureandalogorithm
 * @description: 判断树是否是满二叉树，要求时间复杂度低于O(n)
 * @author: hmx
 * @create: 2021-12-04 16:50
 **/
public class Other1 {

    public static void main(String[] args) {

    }

    /*int height(TreeNode root) {
        if (root == null) {
            return 0;
        }
        int ldepth = height(root.left);
        int rdepth = height(root.right);
        if (ldepth == -1 || rdepth == -1 || Math.abs(ldepth - rdepth) > 0) {
            return -1;
        }
        return Math.max(ldepth, rdepth) + 1;
    }*/

}
